[id].vue 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316
  1. <template>
  2. <!-- 页面头部 -->
  3. <HomePageHead></HomePageHead>
  4. <!-- 导航栏 -->
  5. <HomePageNavigation1></HomePageNavigation1>
  6. <!-- 列表页广告一 -->
  7. <HomeTopTen :imgurl="adList[0]" v-if="adList[0]"></HomeTopTen>
  8. <!-- 面包屑导航 -->
  9. <div class="breadcrumb">
  10. <div class="inner">
  11. <span class="location">当前位置:</span>
  12. <el-breadcrumb :separator-icon="ArrowRight">
  13. <el-breadcrumb-item>
  14. <NuxtLink to="/">首页</NuxtLink>
  15. </el-breadcrumb-item>
  16. <el-breadcrumb-item v-show="name">
  17. <NuxtLink :to="{ path: `/primaryNavigation/${listid}`}">{{name}}</NuxtLink>
  18. </el-breadcrumb-item>
  19. <el-breadcrumb-item>
  20. {{ newsDetail.con_title }}
  21. </el-breadcrumb-item>
  22. </el-breadcrumb>
  23. </div>
  24. </div>
  25. <!-- 资讯列表 -->
  26. <div class="newsDetail">
  27. <div class="inner">
  28. <div class="innerLeft">
  29. <div class="leftBottomTitle">{{ newsDetail.con_title }}</div>
  30. <div class="leftBottom" v-html="newsDetail.content" v-if="newsDetail.content"></div>
  31. </div>
  32. <div class="innerRight">
  33. <div class="rightMenuTitle">导航列表</div>
  34. <ul>
  35. <li v-for="(item, index) in bottomMenu" :key="index">
  36. <NuxtLink :to="`/speciaArticle/${item.id}`" :title="item.name"
  37. v-if="item.id == pageId && item.id != 7" class="active">
  38. {{ item.name }}
  39. </NuxtLink>
  40. <NuxtLink :to="`/speciaArticle/${item.id}`" :title="item.name"
  41. v-else-if="item.id != pageId && item.id != 7">
  42. {{ item.name }}
  43. </NuxtLink>
  44. <NuxtLink :to="`/specialList/${item.id}`" :title="item.name"
  45. v-if="item.id == 7 && pageId == 7 && routeHref == '/specialList/7'" class="active">
  46. {{item.name }}
  47. </NuxtLink>
  48. <NuxtLink :to="`/specialList/${item.id}`" :title="item.name" v-else-if="item.id == 7">
  49. {{ item.name}}
  50. </NuxtLink>
  51. </li>
  52. </ul>
  53. </div>
  54. <div style="clear: both;"></div>
  55. </div>
  56. </div>
  57. <!-- 广告二 -->
  58. <HomeTopTen :imgurl="adList[1]" v-if="adList[1]"></HomeTopTen>
  59. <!-- 页面底部 -->
  60. <HomeFoot1></HomeFoot1>
  61. </template>
  62. <script setup>
  63. //1.页面依赖 start ---------------------------------------->
  64. import { ElBreadcrumb, ElBreadcrumbItem } from 'element-plus'
  65. import { ArrowRight } from '@element-plus/icons-vue'
  66. //获得跳转过来的id
  67. const route = useRoute();
  68. const articleId = route.params.id; //获得该页面的id
  69. const listid = route.query.listId; //获得该页面的id
  70. const name = route.query.listName; //获得该页面的id
  71. const pageId = route.params.id; //获得该页面的id
  72. const routeHref = route.href;
  73. //1.页面依赖 end ---------------------------------------->
  74. //2.页面数据 start ---------------------------------------->
  75. //广告列表
  76. let adList = ref([]);
  77. async function getAdData(){
  78. const adData = await requestDataPromise('/web/getWebsiteAdvertisement',{method:'GET',query:{'ad_tag':'PAGE'}});
  79. adList.value = adData.data;
  80. }
  81. getAdData();
  82. const newsDetail = ref({})
  83. const bottomMenu = ref([]);
  84. async function getPageData() {
  85. const mkdata = await requestDataPromise('/web/getWebsiteFooterCategoryInfo', {
  86. method: 'GET',
  87. query: {
  88. 'fcat_id': articleId
  89. },
  90. });
  91. newsDetail.value = mkdata.data;
  92. }
  93. getPageData();
  94. async function getPageMenu() {
  95. const mkdata = await requestDataPromise('/web/getWebsiteFooterCategory', {
  96. method: 'GET',
  97. query: {},
  98. });
  99. bottomMenu.value = mkdata.data;
  100. }
  101. getPageMenu();
  102. //2.页面数据 end ---------------------------------------->
  103. //4.设置seo信息 start---------------------------------------->
  104. //4.1 设置seo信息
  105. const setData = await requestDataPromise('/web/getWebsiteFootInfo', {
  106. method: 'GET',
  107. query: {},
  108. });
  109. let seoTitle = setData.data.website_head.title;
  110. let seoDescription = setData.data.website_head.description;
  111. let seoKeywords = setData.data.website_head.keywords;
  112. useSeoMeta({
  113. title: seoTitle,
  114. meta: [
  115. { name: 'description', content: seoDescription },
  116. { name: 'keywords', content: seoKeywords }
  117. ]
  118. });
  119. //4.设置seo信息 end---------------------------------------->
  120. </script>
  121. <style lang="less" scoped>
  122. //导航条
  123. .breadcrumb {
  124. width: 100%;
  125. height: 22px;
  126. margin-bottom: 30px;
  127. font-family: Microsoft YaHei, Microsoft YaHei;
  128. font-weight: 400;
  129. font-size: 20px;
  130. color: #666666;
  131. line-height: 23px;
  132. text-align: left;
  133. font-style: normal;
  134. text-transform: none;
  135. .el-breadcrumb::v-deep {
  136. display: inline-block;
  137. vertical-align: -4px;
  138. }
  139. /deep/.el-breadcrumb__inner a,
  140. /deep/.el-breadcrumb__inner.is-link {
  141. color: #666666;
  142. font-weight: 400;
  143. text-decoration: none;
  144. transition: var(--el-transition-color);
  145. }
  146. span {
  147. font-family: Microsoft YaHei, Microsoft YaHei;
  148. font-weight: 400;
  149. font-size: 20px;
  150. color: #666666;
  151. line-height: 23px;
  152. text-align: left;
  153. font-style: normal;
  154. text-transform: none;
  155. }
  156. span:hover {
  157. color: #666666;
  158. }
  159. .location {
  160. margin-right: 20px;
  161. width: 100px;
  162. height: 22px;
  163. font-family: Microsoft YaHei, Microsoft YaHei;
  164. font-weight: 400;
  165. font-size: 20px;
  166. color: #666666;
  167. line-height: 23px;
  168. text-align: left;
  169. font-style: normal;
  170. text-transform: none;
  171. }
  172. }
  173. // 资讯列表
  174. .newsDetail {
  175. width: 100%;
  176. //height: 1400px;
  177. margin-bottom: 70px;
  178. .inner {
  179. width: 1200px;
  180. //height: 1400px;
  181. font-size: 16px;
  182. .innerLeft {
  183. //height: 1400px;
  184. float: right;
  185. .LeftTop {
  186. //height: 522px;
  187. margin-top: 50px;
  188. >h1 {
  189. line-height: 40px;
  190. margin-bottom: 30px;
  191. font-family: Microsoft YaHei, Microsoft YaHei;
  192. font-weight: bold;
  193. font-size: 30px;
  194. color: #333333;
  195. }
  196. >p {
  197. height: 18px;
  198. line-height: 18px;
  199. font-family: Microsoft YaHei, Microsoft YaHei;
  200. font-weight: 400;
  201. font-size: 14px;
  202. color: #999999;
  203. span {
  204. margin-right: 40px;
  205. }
  206. }
  207. >img {
  208. width: 680px;
  209. height: 382px;
  210. padding: 50px 0px 60px 55px;
  211. }
  212. }
  213. .leftBottomTitle {
  214. color: #028E21;
  215. font-size: 24px;
  216. font-weight: bold;
  217. height: 60px;
  218. line-height: 60px;
  219. }
  220. .leftBottom {
  221. width: 790px;
  222. font-size: 20px;
  223. border-top: 1px solid #139602;
  224. padding-top: 40px;
  225. >h3,
  226. >p {
  227. text-indent: 2em;
  228. width: 790px;
  229. font-family: Microsoft YaHei, Microsoft YaHei;
  230. font-size: 20px;
  231. color: #333333;
  232. line-height: 23px;
  233. padding-bottom: 30px;
  234. }
  235. >h3 {
  236. font-weight: 600px;
  237. }
  238. >p {
  239. font-weight: 400;
  240. }
  241. }
  242. }
  243. .innerRight {
  244. width: 279px;
  245. .rightMenuTitle {
  246. width: 279px;
  247. height: 69px;
  248. font-size: 22px;
  249. font-weight: bold;
  250. line-height: 58px;
  251. text-align: center;
  252. color: #fff;
  253. background: url("../../public/special/projectMoreTitle.png") no-repeat;
  254. margin-bottom: 30px;
  255. }
  256. ul {
  257. li {
  258. a {
  259. border-left: 5px solid #028E21;
  260. margin-bottom: 15px;
  261. font-size: 22px;
  262. display: block;
  263. height: 61px;
  264. line-height: 61px;
  265. color: #333333;
  266. text-align: center;
  267. background: #FBFBFB;
  268. }
  269. }
  270. }
  271. .active {
  272. border-left: 0;
  273. border: 1px solid #028E21;
  274. background: #fff;
  275. }
  276. }
  277. }
  278. }
  279. </style>